package com.itstudio.myforumsystem.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itstudio.myforumsystem.entity.Article;
import com.itstudio.myforumsystem.entity.Type;
import com.itstudio.myforumsystem.mapper.TypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeService extends ServiceImpl<TypeMapper, Type> implements IService<Type> {
@Autowired
private TypeMapper typeMapper;

    public List<Article> FindLimitNumArticle(Integer id) {

        return typeMapper.findALLInforOfArticleByTypeNameLimit(id);

    }

    public List<Article> FindAllInfor(String name) {
        return typeMapper.findALLInforOfArticleByTypeName(name);
    }
}
